﻿<%@ Page Title="Edit Product Category Page" Language="C#" MasterPageFile="  ~/template/Site.Master" AutoEventWireup="true" CodeBehind="EditProductCategory.aspx.cs" Inherits="EAAdmin.EditProductCategory" %>
<%@ Import Namespace="EA.DTO" %>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    
    
    <form id="form1" runat="server"  action="EditProductCategory.aspx?action=Update">       
          <%
            String name = "";
            int status  = 0;
            int id = 0;
            
            if (Attributes.ContainsKey("productCategory"))
            {
                ProductCategoryTO productCategory = (ProductCategoryTO)Attributes["productCategory"];
                name = productCategory.Name;
                status = productCategory.Status;
                id = productCategory.ID;
            }
        %> 
        <div class="page_name">Category Updation</div>    
         <div class="error">
            <%                
                String alert = "";
                if (Attributes.ContainsKey("err"))
                {
                    alert = (String)Attributes["err"];
            %>
            <div class="message">
                <div><%=alert%></div>
            </div>
            <%  }
                if (Attributes.ContainsKey("success"))
                {
                    alert = (String)Attributes["success"];
            %>
            <div class="message_alert">
                <div><%=alert%></div>
            </div>
            <%  } %>
        </div>
        <input type="hidden" name="id" value="<%=id %>" />
                        
       <table style="padding-left:40%;">
            <tr>
                <td>Name:</td>
                
                <td>
                    <input type="text" class="textbox" id="Name" name="Name" value="<%=name %>" />
                </td>
                
            </tr>
            <tr>
                <td style="text-align:left">Status:</td>
                <td style="text-align:left">
                    <select name="Status" id="Status">
                       <option <%=(status == EA.Common.Constant.PRODUCT_CATEGORY_ACTICE  ?"selected":"" )%>  value="<%=EA.Common.Constant.PRODUCT_CATEGORY_ACTICE  %>">Active</option>
                       <option <%=(status == EA.Common.Constant.PRODUCT_CATEGORY_NOT_ACTIVE  ?"selected":"" )%> value="<%=EA.Common.Constant.PRODUCT_CATEGORY_NOT_ACTIVE  %>">Not active</option>
                    </select>

                </td>
            </tr>
        
            <tr>
                <td colspan="2" style="text-align:right">
                    <input type="submit" class="button" value="Update"/>
                </td>
            </tr>
        </table>
    </form>
</asp:Content>